import { Http } from '@/utils/Http.js'

export const UserApi = {

	/**
	 * 获取登录用户信息
	 * @returns
	 */
	getTokenInfo: () => {
		return Http.request({
			url: '/app/user/user/getTokenInfo',
			method: 'get'
		})
	},

	/**
	 * 修改密码
	 * @returns
	 */
	updatePassword: (param) => {
		return Http.request({
			url: '/app/user/user/updatePassword',
			method: 'post',
			data: param
		})
	},

	/**
	 * 修改个人信息
	 * @returns
	 */
	updateInfo: (param) => {
		return Http.request({
			url: '/app/user/user/updateInfo',
			method: 'post',
			data: param
		})
	},

	/**
	 * 修改手机号
	 * @returns
	 */
	updateMobile: (param) => {
		return Http.request({
			url: '/app/user/user/updateMobile',
			method: 'post',
			data: param
		})
	},

	/**
	 * 统计团队数据
	 * @returns
	 */
	statisticsTeamData: () => {
		return Http.request({
			url: '/app/user/user/statisticsTeamData',
			method: 'get'
		})
	},
	/**
	 * 分页获取用户列表
	 * @returns
	 */
	getPage: (param) => {
		return Http.request({
			url: '/app/user/user/getPage',
			method: 'post',
			data: param
		})
	},
	/**
	 * 分页获取用户列表
	 * @returns
	 */
	getTeamPage: (param) => {
		return Http.request({
			url: '/app/user/user/getTeamPage',
			method: 'post',
			data: param
		})
	},
}
